import {message} from 'antd'
/**
 * 在请求头中加Authorization进行身份验证
 * @param { Object } header 原始的请求头
 */
export function getTokenHeader(header){
    let _header=Object.assign({},header);
    if(localStorage.token){
        _header['Authorization']=`Bearer${localStorage.token}`;
    }
    console.log("_header:",_header);
    return _header;
}